package com.yxq.mdt.app.modules.personal.adapter;

import com.blankj.utilcode.util.TimeUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yxq.mdt.app.R;
import com.yxq.mdt.app.glide.GlideHelper;
import com.yxq.mdt.app.modules.personal.bean.TopicCommentBean;

import java.text.SimpleDateFormat;
import java.util.List;

/**
 * @author L
 * @time
 * @describe 我的回复
 */
public class MainMyReplyListAdapter extends BaseQuickAdapter<TopicCommentBean.ListBean.GsTopicCommentListBean, BaseViewHolder> {

    public MainMyReplyListAdapter(int layoutResId, List<TopicCommentBean.ListBean.GsTopicCommentListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, TopicCommentBean.ListBean.GsTopicCommentListBean item) {

        helper.setText(R.id.item_layout_time, TimeUtils.getFriendlyTimeSpanByNow(item.getCreateDate(), new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")));
        helper.setText(R.id.item_number_tv, item.getContent());
        helper.addOnClickListener(R.id.item_iv_delete);
    }
}
